﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace XDLPipeline
{
    /// <summary>
    /// Provides serialization support for the raw model information data.
    /// </summary>
    [ContentTypeWriter]
    class ModelInformationWriter: ContentTypeWriter<RawModelInformation>
    {
        protected override void Write(ContentWriter output, RawModelInformation value)
        {            
            // dump the content info the stream
            value.Xml.Save(output.BaseStream);
        }

        /// <summary>
        /// Define the run-time type for the reader
        /// </summary>
        /// <param name="targetPlatform">The target platform.</param>
        /// <returns>The type name.</returns>
        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return "XDL.Framework.Graphics.ModelInformationReader,XDL";
        }
    }
}
